Update ModelContextProtocol to latest#1501
Merged
stephentoub merged 3 commits intomicrosoft:mainfrom Jan 14, 2026
Merged
Conversation
Also bump Microsoft.Extensions.* to latest.
27100fa to
206a509
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the ModelContextProtocol dependency from 0.4.0-preview.3 to 0.6.0-preview.1 (note: PR description mentions 0.5.0-preview.1 but actual version is 0.6.0-preview.1) and updates several Microsoft.Extensions.* packages from version 10.0.1 to 10.0.2. The changes adapt the codebase to breaking API changes in the ModelContextProtocol library.
Changes:
- Updated ModelContextProtocol and ModelContextProtocol.AspNetCore packages to 0.6.0-preview.1
- Updated Microsoft.Extensions.* packages (AI, Caching, Configuration, DependencyInjection, Hosting) to their latest versions (10.0.2 or 10.2.0)
- Updated System.* packages to version 10.0.2
- Adapted code to API changes:
IReadOnlyDictionary→IDictionaryfor tool arguments,Contentproperty now a collection, added requiredMaxTokensproperty, and renamedSetLoggingLevel→SetLoggingLevelAsync
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Directory.Packages.props | Updated ModelContextProtocol packages to 0.6.0-preview.1 and bumped Microsoft.Extensions.* and System.* packages to latest versions; reorganized Microsoft.CognitiveServices.Speech package location |
| core/Azure.Mcp.Core/src/Commands/CommandExtensions.cs | Changed parameter type from IReadOnlyDictionary<string, JsonElement> to IDictionary<string, JsonElement> to match updated ModelContextProtocol API |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/BaseToolLoader.cs | Updated to use IDictionary instead of IReadOnlyDictionary for tool arguments |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/RegistryToolLoader.cs | Changed TransformArgumentsToDictionary method signature to accept IDictionary instead of IReadOnlyDictionary |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs | Updated method signatures, added MaxTokens property to sampling requests, changed Content to collection syntax, updated content access pattern, and added named cancellationToken parameter |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/ServerToolLoader.cs | Applied same API updates as NamespaceToolLoader: collection-based Content, MaxTokens addition, and updated content access pattern |
| core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/SingleProxyToolLoader.cs | Applied consistent API updates including collection-based Content, MaxTokens property, and updated sampling response handling |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/*.cs | Updated test helper methods to use IDictionary instead of IReadOnlyDictionary for consistency with production code |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/ToolLoading/BaseToolLoaderTests.cs | Updated test to use collection syntax for Content property and added required MaxTokens field |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.LiveTests/ClientToolTests.cs | Renamed method call from SetLoggingLevel to SetLoggingLevelAsync to match updated API |
| core/Azure.Mcp.Core/tests/Azure.Mcp.Core.UnitTests/Areas/Server/Commands/Runtime/McpRuntimeTests.cs | Updated test helper method signature to use IDictionary instead of IReadOnlyDictionary |
alzimmermsft
approved these changes
Jan 14, 2026
core/Azure.Mcp.Core/src/Areas/Server/Commands/ToolLoading/NamespaceToolLoader.cs
Outdated
Show resolved
Hide resolved
950eb64 to
28671a3
Compare
alzimmermsft
approved these changes
Jan 14, 2026
This was referenced Jan 14, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Updates ModelContextProtocol dependency to 0.6.0-preview.1. Also bump Microsoft.Extensions.* to latest.